package com.ybkj.daijia.server.model;

import com.fasterxml.jackson.annotation.JsonIgnore;
import java.math.BigDecimal;

/**
 * 微信客户经理
 *
 * @author Shine
 */
public class WeixinManager extends Base {

    /**
     * 未审核
     */
    public static final int WEIXINMANAGER_STATUS_NOTYET = 0;
    /**
     * 审核成功
     */
    public static final int WEIXINMANAGER_STATUS_OK = 1;
    /**
     * 审核失败
     */
    public static final int WEIXINMANAGER_STATUS_FAILURE = 2;
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    @JsonIgnore
    private String wxuser;// 微信账号(openId)

    private String name;//姓名

    private String phone;//电话号码

    private String wxAccount;// 微信号

    private String provName;//省名

    private String cityName;//市名

    private String place;//工作单位地址

    private String placeName;//工作单位名称

    private Double longitude; // 工作单位地址经度

    private Double latitude; // 工作单位地址纬度

    private String idCard;//身份证

    private String jobNumber;//工号

    private String personalInfo;//个人说明

    private BigDecimal virtual;//余额

    private Integer status;//审核状态

    @JsonIgnore
    private BigDecimal ratioMoney;// 提成比例

    @JsonIgnore
    private BigDecimal fixedMoney;// 固定提成金额

    @JsonIgnore
    private WeixinManagerMoneyType weixinManagerMoneyType; // 提成方式

    @JsonIgnore
    private Long waitTixian;//待提现数量，仅前台用，不生成字段

    private Long companyId;//公司id

    private Company company;//

    @JsonIgnore
    private Long areaId;//收费标准

    @JsonIgnore
    private Integer feeAllocation;//公司承担比例 0-100

    private String auditMemo;//审核备注

    private BigDecimal totalIncome;//总收入（临时字段）

    private BigDecimal monthIncome;//月收入（临时字段）


    public BigDecimal getTotalIncome() {
        if (null == totalIncome) {
            return BigDecimal.ZERO;
        }
        return totalIncome;
    }

    public void setTotalIncome(BigDecimal totalIncome) {
        this.totalIncome = totalIncome;
    }

    public BigDecimal getMonthIncome() {
        if (null == monthIncome) {
            return BigDecimal.ZERO;
        }
        return monthIncome;
    }

    public void setMonthIncome(BigDecimal monthIncome) {
        this.monthIncome = monthIncome;
    }

    public String getAuditMemo() {
        return auditMemo;
    }

    public void setAuditMemo(String auditMemo) {
        this.auditMemo = auditMemo;
    }

    public String getWxAccount() {
        return wxAccount;
    }

    public void setWxAccount(String wxAccount) {
        this.wxAccount = wxAccount;
    }

    public String getProvName() {
        return provName;
    }

    public void setProvName(String provName) {
        this.provName = provName;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getPlaceName() {
        return placeName;
    }

    public void setPlaceName(String placeName) {
        this.placeName = placeName;
    }

    public Long getAreaId() {
        return areaId;
    }

    public void setAreaId(Long areaId) {
        this.areaId = areaId;
    }

    public Integer getFeeAllocation() {
        return feeAllocation;
    }

    public void setFeeAllocation(Integer feeAllocation) {
        this.feeAllocation = feeAllocation;
    }

    public String getWxuser() {
        return wxuser;
    }

    public void setWxuser(String wxuser) {
        this.wxuser = wxuser;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    public String getPlace() {
        return place;
    }

    public void setPlace(String place) {
        this.place = place;
    }

    public Double getLongitude() {
        return longitude;
    }

    public void setLongitude(Double longitude) {
        this.longitude = longitude;
    }

    public Double getLatitude() {
        return latitude;
    }

    public void setLatitude(Double latitude) {
        this.latitude = latitude;
    }

    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    public String getJobNumber() {
        return jobNumber;
    }

    public void setJobNumber(String jobNumber) {
        this.jobNumber = jobNumber;
    }

    public String getPersonalInfo() {
        return personalInfo;
    }

    public void setPersonalInfo(String personalInfo) {
        this.personalInfo = personalInfo;
    }

    public BigDecimal getVirtual() {
        if (null == virtual) {
            return BigDecimal.ZERO;
        }
        return virtual;
    }

    public void setVirtual(BigDecimal virtual) {
        this.virtual = virtual;
    }

    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    public BigDecimal getRatioMoney() {
        return ratioMoney;
    }

    public void setRatioMoney(BigDecimal ratioMoney) {
        this.ratioMoney = ratioMoney;
    }

    public BigDecimal getFixedMoney() {
        return fixedMoney;
    }

    public void setFixedMoney(BigDecimal fixedMoney) {
        this.fixedMoney = fixedMoney;
    }

    public WeixinManagerMoneyType getWeixinManagerMoneyType() {
        if (null == weixinManagerMoneyType) {
            return WeixinManagerMoneyType.guding;
        }
        return weixinManagerMoneyType;
    }

    public void setWeixinManagerMoneyType(
        WeixinManagerMoneyType weixinManagerMoneyType) {
        this.weixinManagerMoneyType = weixinManagerMoneyType;
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Long getWaitTixian() {
        return waitTixian;
    }

    public void setWaitTixian(Long waitTixian) {
        this.waitTixian = waitTixian;
    }

    public Company getCompany() {
        return company;
    }

    public void setCompany(Company company) {
        this.company = company;
    }


    public enum WeixinManagerMoneyType {
        /**
         * 比例
         */
        bili,
        /**
         * 固定
         */
        guding
    }

}
